/*
 * Copyright (C) 2015 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

@import "base/environment";
@import "pages/shared/move_dialog";
@import "base/mixins/misc";

.drag_and_drop_warning {
  @include accessibility-prompt($is-link: false);
  &:focus {
    margin-bottom: 8px;
  }
}

.ag-header-controls {
  position: absolute;
  top: 0;
  right: 0;
}

.loadingIndicator {
  margin-top: 15px;
}

.group_select {
  margin-left: 20px;
}

#ag_weights_wrapper {
  position: relative;
  padding: 0 20px;
}

#assignment_groups_weights {
  width: 100%;
  td {
    padding: 10px 0px;
  }
  td.right-align {
    text-align: right;
  }
  tfoot td {
    font-weight: bold;
  }
}

.assignment {
  .default-dates .status-description { font-weight: bold; }
}

@media screen and (max-width: 1280px) {
  #course_home_content {
    .assignment-date-available {
      visibility: hidden;
    }
  }
}

.form-dialog-content.ag-weights-content {
  bottom: 59px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.ag-weights-message {
  display: block;
  margin: 20px 20px 0 20px;
}

.ag-weights-content .checkbox {
  display: block;
  margin: 20px;
}

.ag-weights-form {
  overflow-y: scroll;
}

.ag-weights-table {
  padding-bottom: 10px;
}

.ag-weights-tr {
  border-bottom: 1px solid #dae1e6;
}

.ag-settings-weights-message {
  margin: 0 0 20px 0;
}

.disable-sync-to-sis-message {
  display: block;
  margin: 20px 20px 0 20px;
}

.sync-to-sis-message-content {
  display: block;
  margin: 20px;
}

.remove_never_drop {
  color: #666;
  &:hover {
    color: #333;
  }
}

.never_drop_rule {
  padding-bottom: 5px;
}

.drop_rules_section {
  margin-bottom: 0;
  @include fontSize(14px);
  line-height: 20px;
  border-bottom: 0;
  font-weight: bold;
}

.show-by-label {
  // to match what we add to non-wrapped labels in bootstrap overrides
  vertical-align: -4px;
  margin-right: 5px;
}

.sortable-handle, .draggable-handle {
  cursor: pointer;
  color: darken($ic-color-neutral, 40%);
  a {
    color: darken($ic-color-neutral, 40%);
  }

  &.disabled {
    cursor: not-allowed;

    .icon-drag-handle {
      color: darken($ic-color-neutral, 10%);
    }
  }
}

.sortable-handle {
  margin: 0 0px 0 -30px;
  padding: 0 0px 0 30px;
  a {
    padding: 20px 0px 10px 0px;
  }
}

.sortable-dropzone {
  height: 50px;
  background-color: #dce1e6;
  border: 1px dashed #c1c7cf;
  border-top: none;
}

.ui-sortable-helper {
  background-color: $ic-color-light;
  border: 1px solid $ic-border-dark !important;
  box-shadow: 0px 1px 16px rgba(black, 0.3);
}

.draggable .ui-sortable-helper {
  background-color: white;
  div {
    border: none !important;
  }
}

.draggable-dropzone {
  height: 40px;
  background-color: lighten($ic-color-dark, 15%);
  border-right: 1px dashed $ic-border-dark;
  border-left: 1px dashed $ic-border-dark;
}

.ag-header-controls .tooltip_link {
  color: #3d454c;
}

#ag-list {
  padding-bottom: 100px;
}

.row-fluid span.grade-display {
  margin-left: 9%;
}

.accessible-toggler {
  @include ic-focus-base;
  color: #333;
  &:focus { @include ic-focus-variant; }
  &:hover, &:focus {
    color: #333;
    text-decoration: none;
  }
}

.ig-header-title {
  .icon-sis-imported:before {
    font-size: 1.5rem;
    vertical-align: middle;
  }
}

.new_quiz_lti_wrapper {
  display: inline-block;
  margin-right: 6px;
  padding-right: 10px;
  border-right: 1px solid $ic-color-medium-lighter;
}

/* support for master class locked input fields */
form[data-view='edit-assignment'] {
  h3 {
    margin: 5px 8px;
    font-weight: bold;
    font-size: 1em;
  }
  @include readonly-input;

  .date_field_container.readonly {
    input.datetime_field {
      margin-top: -3px;
    }
    button.ui-datepicker-trigger, .datetime_suggest {
      display: none;
    }
  }

  input[name='points_possible'][readonly] {
    margin-top: -3px;
  }
}
